# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-coloredlogs
pkgver=15.0.1
pkgrel=1
pkgdesc="Colored terminal output for Python's logging module"
url="https://coloredlogs.readthedocs.io/en/latest/"
arch="noarch"
license="MIT"
depends="python3 py3-humanfriendly"
makedepends="py3-setuptools"
checkdepends="py3-capturer py3-pytest py3-verboselogs"
source="https://files.pythonhosted.org/packages/source/c/coloredlogs/coloredlogs-$pkgver.tar.gz"
builddir="$srcdir/coloredlogs-$pkgver"

build() {
	python3 setup.py build
}

check() {
	#deselected tests need script from github tarball
	pytest --deselect=coloredlogs/tests.py::ColoredLogsTestCase::test_auto_install \
		--deselect=coloredlogs/tests.py::ColoredLogsTestCase::test_cli_conversion \
		--deselect=coloredlogs/tests.py::ColoredLogsTestCase::test_empty_conversion \
		--deselect=coloredlogs/tests.py::ColoredLogsTestCase::test_output_interception \
		coloredlogs/tests.py

}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	find "$pkgdir" -name "*tests*" -delete
}

sha512sums="
577af26af8d27bca3f10e6aaa257245aba608cc3832985ba57bcb2b590b10bf054796a2210749c15ee1b1a17623e007e4ac3ba17bed6af95544f85f5dfafaf21  coloredlogs-15.0.1.tar.gz
"
